package main

import (

	"fmt"
)

type dongwu struct {
	name string
	age int
}

type cat struct {
	dongwu
	color string
}

type dog struct {
	dongwu
	address string
}

type Integer int


func main()  {
	//dongwu1:=dongwu{}
	//fmt.Println(dongwu1)
	c1:=cat{}
	c1.name="小花"
	c1.age=3
	c1.color="北京"
	fmt.Println(c1)

	d1:=dog{dongwu{"小草",4},"天津"}
	fmt.Println(d1.name,d1.age,d1.address)

	d2:=dog{dongwu:dongwu{"小路",6},address:"吉林"}
	fmt.Println(d2)

var a Integer =1
if a.Less(2){
	fmt.Println(a,"Less 2")
}

}

func (a Integer) Less(b Integer) bool {
	return a<b
}